<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../../images/favicon.ico">
	<!-- 引入header -->
    <include file="Public/header" />
    <!-- 结束 -->
  
  <!-- Main Navbar -->
  <div class="main-nav">  	
	   <nav class="navbar navbar-expand-lg">
          <div class="collapse navbar-collapse" id="navbarNavDropdown">
            <ul class="navbar-nav">
              <li class="nav-item ">
                <a class="nav-link" href="/admin.php"><span class="active-item-here"></span><i class="fa fa-dashboard mr-5"></i> <span>仪表盘</span></a>
              </li>
              <li class="nav-item dropdown">

                <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-th mr-5"></i><span>应用中心</span>
                </a>                  
                <ul class="dropdown-menu multilevel scale-up-left">
                	<li class="nav-item"><a class="nav-link" href="{:U('tools/index')}">应用管理</a></li>
                	<li class="nav-item"><a class="nav-link" href="{:U('tools/add')}">新增应用</a></li>     
                	<li class="nav-item"><a class="nav-link  href="{:U('tools/classe')}">分类管理</a></li> 
                  <li class="nav-item"><a class="nav-link" href="{:U('tools/link')}">友链管理</a></li>
                  <li class="nav-item"><a class="nav-link" href="{:U('tools/menu')}">导航管理</a></li>            
                </ul>                 
              </li> 
              
              <li class="nav-item dropdown m-menu m-fix  active">
                <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-table mr-5"></i>  <span class="active-item-here"></span><span>系统设置</span>
                </a>
                <div class="dropdown-menu menu-mega mega-menu-auto scale-up-left">
                    <ul class="dropdown-menu multilevel scale-up-left">
                        <li>
                            <a class="nav-link active"" href="{:U('system/index')}" title=""><i class="fa fa-creative-commons mr-15"></i>基础设置</a>
                        </li>
                        <li>
                            <a class="nav-link" href="{:U('system/upinfo')}" title=""><i class="fa fa-address-card-o mr-15"></i>信息修改</a>
                        </li>
                         <li>
                            <a class="nav-link" href="{:U('system/temp')}" title=""><i class="fa fa-cubes mr-15"></i>模板设置</a>
                        </li>
                       <!--  -->
                    </ul><!-- /.menu-mega-child one-four -->
                          
                    
                </div>
                  
              </li>
              
              <li class="nav-item dropdown m-menu">
                <a class="nav-link" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-laptop mr-5"></i> <span>应用商店</span>
                </a>
                <div class="dropdown-menu menu-mega scale-up-down">
                  
                    
                </div>
                  
              </li>               
              <li class="nav-item dropdown">
                <a class="nav-link" href="{:U('update/index')}">
                  <i class="fa fa-puzzle-piece mr-5"></i>检查更新
                </a>
              </li>
               
            </ul>
          </div>
        </nav>  	  
  </div>

  

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        你的站点基础设置吧！
      </h1>
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/admin.php"><i class="fa fa-dashboard"></i> 仪表盘</a></li>
        <li class="breadcrumb-item"><a href="#">系统设置</a></li>
        <li class="breadcrumb-item active">基础设置</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
    	
		<div class="row">
      <volist name="temp" id="tp">
      <div class="col-md-12 col-lg-4">
        <div class="box">
        <div class="box-header with-border">
          <h3 class="box-title d-block text-center">{$tp.name}</h3>          
        </div>
        <div class="box-body">
            <a class="d-block" href="coming-soon-2.html" target="_blank">
            <img src="{$tp.img}" alt="Verify Emial page" style="width: 100%;height:100% ">
          </a>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">

                <if condition="$nowtemp eq $tp['url']">
                  
                  <button type="button" id="classedit" class="btn btn-secondary pull-right">当前主题</button>
                  <else /> 
                  <input type="hidden" id="tempval" value="{$tp.url}">
                  <button type="button" id="usetemp" class="btn btn-info pull-right">应用主题</button>
                </if>
                
                
        </div>
        </div>
  </div>
      </volist>    
    </div>
      <!-- /.row -->
      
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  
	<include file="Public/footer" />
	<script src="__PUBLIC__/Admin/js/layer/layer.js"></script>
	<script type="text/javascript">
   $("#usetemp").click(function () {
        var e = 0;
        var te = $("#tempval").val();
        if (te =='') {
          layer.msg('当前主题正在使用', function () {
                //关闭后的操作
                return false;
            });
            return false;
        }
        if (e == 0) {
            $.post("{:U('system/usetemp')}", { te:te}, function (data) {
              var index = layer.load(1, {shade: false}); //0代表加载的风格，支持0-2
                if (data.status == '1') {
                    layer.closeAll('loading');
                    layer.msg(data.info, { icon: 6 },function () {window.location.href = data.url;});//layer.msg('不开心。。', {icon: 5});
                    
                } else {
                  layer.closeAll('loading');
                    layer.alert(data.info, { icon: 5 });
                }
            })
        }

    }) 
  </script>
	
</body>
</html>
